//
//  ViewController.m
//  QQMusic
//
//  Created by 苗钧豪 on 16/7/19.
//  Copyright © 2016年 苗钧豪. All rights reserved.
//

#import "ViewController.h"
#import <QuartzCore/QuartzCore.h>
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
#pragma mark ================ 1、设置背景图片 ================
    UIImageView *backimgview = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"背景.jpg"]];
    backimgview.frame = [UIScreen mainScreen].bounds;
    backimgview.userInteractionEnabled = YES;
    [self.view addSubview:backimgview];
#pragma mark ================ 2、放置一个view ================
    UIView *myView = [[UIView alloc]initWithFrame:CGRectMake(60, 130, 300, 300)];
    [backimgview addSubview:myView];
    UIImageView *imgview = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"模特.jpg"]];
    imgview.frame = CGRectMake(0, 0, myView.frame.size.width, myView.frame.size.height);
    myView.layer.cornerRadius = 150;
    myView.layer.masksToBounds = YES;
    [myView addSubview:imgview];
#pragma mark ================ 3、布置周围的控件 ================
    UIButton *downbtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    downbtn.frame = CGRectMake(25, 25, 35, 30);
    [downbtn setBackgroundImage:[UIImage imageNamed:@"下拉1.png"] forState:(UIControlStateNormal)];
    [backimgview addSubview:downbtn];
    
    UIButton *morebtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    morebtn.frame = CGRectMake(350, 25, 40, 30);
    [morebtn setBackgroundImage:[UIImage imageNamed:@"更多1.png"] forState:(UIControlStateNormal)];
    [backimgview addSubview:morebtn];
    
    UIButton *HQbtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    HQbtn.frame = CGRectMake(90, 95, 55, 25);
    [HQbtn setBackgroundImage:[UIImage imageNamed:@"HQ.png"] forState:(UIControlStateNormal)];
    [backimgview addSubview:HQbtn];
    
    UIButton *onebtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    onebtn.frame = CGRectMake(155, 95, 50, 25);
    [onebtn setBackgroundImage:[UIImage imageNamed:@"独家.png"] forState:(UIControlStateNormal)];
    [backimgview addSubview:onebtn];
    
    UIButton *MVbtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    MVbtn.frame = CGRectMake(215, 95, 50, 25);
    [MVbtn setBackgroundImage:[UIImage imageNamed:@"MV.png"] forState:(UIControlStateNormal)];
    [backimgview addSubview:MVbtn];
    
    UIButton *dtsbtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    dtsbtn.frame = CGRectMake(275, 95, 50, 25);
    [dtsbtn setTitle:@"dts" forState:(UIControlStateNormal)];
    [backimgview addSubview:dtsbtn];
    
    UILabel *musiclabel = [[UILabel alloc]initWithFrame:CGRectMake(190, 20, 60, 30)];
    musiclabel.text = @"模特";
    musiclabel.textColor = [UIColor whiteColor];
    [backimgview addSubview:musiclabel];
    
    UILabel *namelabel = [[UILabel alloc]initWithFrame:CGRectMake(160, 50, 200, 30)];
    namelabel.text = @"— 李荣浩 —";
    namelabel.textColor = [UIColor whiteColor];
    [backimgview addSubview:namelabel];
    
    UILabel *textlabel = [[UILabel alloc]initWithFrame:CGRectMake(110, 450, 250, 30)];
    textlabel.text = @"没什么 至少证明我们还活着";
    textlabel.textColor = [UIColor lightGrayColor];
    [backimgview addSubview:textlabel];
    
    UIPageControl *page = [[UIPageControl alloc]initWithFrame:CGRectMake(185, 485, 50, 30)];
    page.currentPage = 1;
    page.numberOfPages = 3;
    [backimgview addSubview:page];
    
    UIPageControl *page1 = [[UIPageControl alloc]initWithFrame:CGRectMake(120, 550, 50, 30)];
    page1.numberOfPages = 1;
    [page1 sizeForNumberOfPages:0.1];
    [backimgview addSubview:page1];
    
    UISlider *slider = [[UISlider alloc]initWithFrame:CGRectMake(70, 550, 270, 30)];
    [slider setMinimumTrackImage:[UIImage imageNamed:@"滑动左视图"] forState:(UIControlStateNormal)];
    [slider setThumbImage:[UIImage imageNamed:@"滑块"] forState:(UIControlStateNormal)];
    slider.value = 0.75;
    [backimgview addSubview:slider];
    
    UILabel *leftlabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 550, 50, 30)];
    leftlabel.text = @"03:51";
    leftlabel.textColor = [UIColor lightGrayColor];
    [backimgview addSubview:leftlabel];
    
    UILabel *rightlabel = [[UILabel alloc]initWithFrame:CGRectMake(345, 550, 50, 30)];
    rightlabel.text = @"05:06";
    rightlabel.textColor = [UIColor lightGrayColor];
    [backimgview addSubview:rightlabel];
    
    UIButton *playbtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [playbtn setBackgroundImage:[UIImage imageNamed:@"播放"] forState:(UIControlStateNormal)];
    playbtn.frame = CGRectMake(160, 580, 100, 100);
    [backimgview addSubview:playbtn];
    
    UIButton *playbtn1 = [UIButton buttonWithType:UIButtonTypeCustom];
    [playbtn1 setBackgroundImage:[UIImage imageNamed:@"上一首"] forState:(UIControlStateNormal)];
    playbtn1.frame = CGRectMake(70, 590, 80, 80);
    [backimgview addSubview:playbtn1];
    
    UIButton *playbtn2 = [UIButton buttonWithType:UIButtonTypeCustom];
    [playbtn2 setBackgroundImage:[UIImage imageNamed:@"下一首"] forState:(UIControlStateNormal)];
    playbtn2.frame = CGRectMake(270, 590, 80, 80);
    [backimgview addSubview:playbtn2];

    UIButton *btn1 = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [btn1 setBackgroundImage:[UIImage imageNamed:@"喜欢1"] forState:(UIControlStateNormal)];
    btn1.frame = CGRectMake(30, 680, 40, 40);
    [backimgview addSubview:btn1];
    
    UIButton *btn2 = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [btn2 setBackgroundImage:[UIImage imageNamed:@"循环1"] forState:(UIControlStateNormal)];
    btn2.frame = CGRectMake(110, 680, 40, 40);
    [backimgview addSubview:btn2];
    
    UIButton *btn3 = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [btn3 setBackgroundImage:[UIImage imageNamed:@"下载1"] forState:(UIControlStateNormal)];
    btn3.frame = CGRectMake(190, 680, 40, 40);
    [backimgview addSubview:btn3];
    
    UIButton *btn4 = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [btn4 setBackgroundImage:[UIImage imageNamed:@"分享1"] forState:(UIControlStateNormal)];
    btn4.frame = CGRectMake(270, 680, 40, 40);
    [backimgview addSubview:btn4];
    
    UIButton *btn5 = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [btn5 setBackgroundImage:[UIImage imageNamed:@"音乐1"] forState:(UIControlStateNormal)];
    btn5.frame = CGRectMake(350, 680, 40, 40);
    [backimgview addSubview:btn5];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
